Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(csharp) .NET 8.0 code migration #966

Merged
merged 10 commits into from
Nov 26, 2023
Merged

feat(csharp) .NET 8.0 code migration #966

merged 10 commits into from
Nov 26, 2023

Conversation

hpstory
Copy link
Contributor

@hpstory hpstory commented Nov 24, 2023

If this PR is related to coding or code translation, please fill out the checklist and paste the console outputs to the PR.

  • I've tested the code and ensured the outputs are the same as the outputs of reference code.
  • I've checked the code (formatting, comments, indentation, file header, etc) carefully.
  • The code does not rely on a particular environment or IDE and can be executed on a standard system (Win, macOS, Ubuntu).

@hpstory
Copy link
Contributor Author

hpstory commented Nov 24, 2023

  1. migrate code to .NET 8(LTS version) with C# 12
  2. fix nullable check
  3. simplified collection initialization
  4. mark method as static without access instance data
  5. slient warning for name style/lower case
  6. primary constructors in classes

@hpstory hpstory changed the title frat(csharp) .NET 8.0 code migration feat(csharp) .NET 8.0 code migration Nov 24, 2023
Copy link
Owner

@krahets krahets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! Please address the comments, and we should update the https://www.hello-algo.com/chapter_appendix/installation/#7-c as well

@hpstory
Copy link
Contributor Author

hpstory commented Nov 24, 2023

Thanks for the update! Please address the comments, and we should update the https://www.hello-algo.com/chapter_appendix/installation/#7-c as well

Done

@hpstory hpstory closed this Nov 24, 2023
@hpstory hpstory reopened this Nov 24, 2023
@krahets
Copy link
Owner

krahets commented Nov 24, 2023

I found that .Net 8.0 was released on Nov 14. We shall be the first algorithm tutorial that provides .Net 8.0 implementation!

@hpstory
Copy link
Contributor Author

hpstory commented Nov 25, 2023

I found that .Net 8.0 was released on Nov 14. We shall be the first algorithm tutorial that provides .Net 8.0 implementation!

To be precise, it should be C# 12, because the features in .NET framework is not used in our algorithm code.

Copy link
Owner

@krahets krahets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the throughout update!

@krahets krahets merged commit 56b20ef into krahets:main Nov 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants